package com.wq.search.entity;

import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;


@Data
@Document(indexName = "bailiban")
public class Article {
    @Id
    private String id;
    @Field(type = FieldType.Keyword,searchAnalyzer = "ik_smart",analyzer = "ik_max_word")
    private String title;
    @Field(type = FieldType.Text,searchAnalyzer = "ik_smart",analyzer = "ik_max_word")
    private String content;
    @Field(type = FieldType.Integer)
    private String state;
}
